#!/usr/bin/env python
# -*- coding:utf-8 -*- 
# Author: Jeokayne Ataier

import socket

server = socket.socket(socket.AF_INET,socket.SOCK_STREAM)

server.bind(("127.0.0.1",8881))

server.listen(10)

while True:
    conn,addr = server.accept()
    conn.sendall("Welcome to Client Service!".encode("utf-8"))
    while True:
        client_msg = conn.recv(1024)
        if not client_msg:
            break
        print("Client:",client_msg.decode("utf-8"))
        conn.sendall("What???".encode("utf-8"))

    conn.close()